<!-- BEGIN CONTENT -->
	<div id="content">	    
	    <div class="box-out">
	    	<div class="box-in">
	    		<div class="box-head"><h1>Cấp quyền user</h1></div>
	    		<div class="box-content">
	    			<div class="notification error-box" style="<?php echo $error!="" ? "display:block" : ""?>">
	    				<div class="messages"><?php echo $error; ?><div class="close"><img src="<?php echo STATIC_DOMAIN ?>skins/admin/images/icon/close.png" alt="close" /></div></div>
	    			</div><!-- end div .notification error -->
	    			<div class="notification success" style="<?php echo $success!="" ? "display:block" : ""?>">
	    				<div class="messages"><?php echo $success;?> <div class="close"><img src="<?php echo STATIC_DOMAIN ?>skins/admin/images/icon/close.png" alt="close" /></div></div>
	    			</div><!-- end div .notification success -->
	    			<div class="notification warning">
	    				<div class="messages">Warning messages <div class="close"><img src="<?php echo STATIC_DOMAIN ?>skins/admin/images/icon/close.png" alt="close" /></div></div>
	    			</div><!-- end div .notification warning -->
	    			<div class="notification info">
	    				<div class="messages">info messages <div class="close"><img src="<?php echo STATIC_DOMAIN ?>skins/admin/images/icon/close.png" alt="close" /></div></div>
	    			</div><!-- end div .notification info -->	    			
	    			<div class="form">
	    				<form action="" method="post" name="frmNewAdd" id="frmNewAdd">	    					
    						<input type="hidden" name="frmToken" id="frmToken" value="<?php echo $frmToken; ?>"/>
		    					<label for="username_field">Username</label>
	    						<input type="text" class="text small" name="username" id="username" value=""/>	    						
	    						<label for="password_field">Password</label>
	    						<input type="password" class="text small" name="password" id="password" value=""/>	    						
    							<hr />
    						<input type="submit" value="Create" class="submit" />     						
	    				</form>
	    			</div><!-- end div .table -->
	    		</div><!-- end div .box-content -->
	    	</div><!-- end div .box-in -->
	    </div><!-- end div .box-out -->	    	    
	</div><!-- end div #content -->	
	<!-- END CONTENT -->
	<script type="text/javascript">
	$(document).ready(function(){
		var error = "<?php echo $error?>";
		if(error == 1)
			$(".error").show();
		$('.close').click(function(){
			$(this).parents('.notification').fadeOut(500);
		});
	});	

	$("#frmNewAdd").validate({
        invalidHandler: function(form, validator) {
            var errors = validator.numberOfInvalids();
            if (errors) {
                var firstItemId = validator.errorList[0].element.id;
                $("body, html").animate({
                    scrollTop : $("#"+firstItemId).position().top
                });
                $("#"+firstItemId).focus();
            }
        },
        errorElement: "li",
        wrapper: "ul class='errors'", 
        errorPlacement: function(error, element) {
            error.insertAfter(element);
        },
        rules: {
        	username : {
                required:true,
                minlength:3              
            }            
	        password : {
	            required:true,
	            minlength:6,                
	        }	
        },
        messages: {
        	username : 'Tên user tối thiểu 3 kí tự',
        	password : 'Password tối thiểu 6 kí tự'        	        
        }
    });
	</script>